<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <base href="<%=basePath%>">
    <!-- 图片上传样式 -->
    <link rel="stylesheet" href="static/ace/css/indexfile.css"/>
    <!-- 下拉框 -->
    <link rel="stylesheet" href="static/ace/css/chosen.css" />
    <!-- jsp文件头和头部 -->
    <%@ include file="../../system/index/top.jsp"%>
</head>
<body class="no-skin">
<!-- /section:basics/navbar.layout -->
<div class="main-container" id="main-container">
    <!-- /section:basics/sidebar -->
    <div class="main-content">
        <div class="main-content-inner">
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <form action="${actionUrl}" name="form" id="form" method="post" enctype="multipart/form-data">
                            <input type="hidden" name="id" id="id" value="${circleInfo.id}"/>
                            <div id="zhongxin" style="padding-top: 13px;">
                                <table id="table_report" class="table table-striped table-bordered table-hover">
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;"><font color="red">*</font>圈子背景图：</td>
                                        <td style="width:80%;">
                                            <div>
                                                <section class=" img-section" style="margin-left: 21px;">
                                                    <div class="z_photo upimg-div clear" id="z_photo-one">
                                                        <section class="z_file fl">
                                                            <c:if test="${not empty circleInfo.backgroundImageUrl }">
                                                                <img src="${circleInfo.backgroundImageUrl }" class="add-img">
                                                            </c:if>
                                                            <c:if test="${empty circleInfo.backgroundImageUrl }">
                                                                <img src="static/images/sctp.png" class="add-img">
                                                            </c:if>
                                                            <input type="file" id="pictureAddressOne" name="pictureAddressOne" class="file" accept="image/jpg,image/jpeg,image/png,image/bmp" multiple />
                                                        </section>
                                                    </div>
                                                </section>
                                            </div>
                                            <aside class="mask works-mask" id="works-mask-one">
                                                <div class="mask-content">
                                                    <p class="del-p">您确定要删除该图片吗？</p>
                                                    <p class="check-p"><span class="del-com wsdel-ok" id="wsdel-ok-one">确定</span><span class="wsdel-no" id="wsdel-no-one">取消</span></p>
                                                </div>
                                            </aside>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;"><font color="red">*</font>圈子头像：</td>
                                        <td style="width:80%;">
                                            <div>
                                                <section class=" img-section" style="margin-left: 21px;">
                                                    <div class="z_photo upimg-div clear" id="z_photo-two">
                                                        <section class="z_file fl">
                                                            <c:if test="${not empty circleInfo.circleIcon }">
                                                                <img src="${circleInfo.circleIcon }" class="add-img">
                                                            </c:if>
                                                            <c:if test="${empty circleInfo.circleIcon }">
                                                                <img src="static/images/sctp.png" class="add-img">
                                                            </c:if>
                                                            <input type="file" id="pictureAddressTwo" name="pictureAddressTwo" class="file" accept="image/jpg,image/jpeg,image/png,image/bmp" multiple />
                                                        </section>
                                                    </div>
                                                </section>
                                            </div>
                                            <aside class="mask works-mask" id="works-mask-two">
                                                <div class="mask-content">
                                                    <p class="del-p">您确定要删除该图片吗？</p>
                                                    <p class="check-p"><span class="del-com wsdel-ok" id="wsdel-ok-two">确定</span><span class="wsdel-no" id="wsdel-no-two">取消</span></p>
                                                </div>
                                            </aside>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;"><font color="red">*</font>圈子简介：</td>
                                        <td style="width:80%;"><input type="text" name="circleBrief" id="circleBrief" maxlength="16" value="${circleInfo.circleBrief}" placeholder="1-16个字" title="圈子简介" style="width:98%;"/></td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;"><font color="red">*</font>选择圈主：</td>
                                        <td style="width:80%;" id="portalUserInfoSelect">
                                            <select class="chosen-select form-control" name="userId" id="userId" data-placeholder="这里选择圈主" style="width:120px;">
                                                <c:forEach items="${portalUserInfoList}" var="portalUserInfo" >
                                                    <option value="${portalUserInfo.userId}" <c:if test="${portalUserInfo.userId eq userId}">selected</c:if>>${portalUserInfo.nameShow}</option>
                                                </c:forEach>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;"><font color="red">*</font>所属一级类别：</td>
                                        <td style="width:80%;" id="mainTypeCodeSelect">
                                            <select class="chosen-select form-control" name="mainTypeCode" id="mainTypeCode" data-placeholder="这里选择所属一级类别" style="width:120px;">
                                                <c:forEach items="${menuOneLevelConfigList}" var="menuOneLevelConfig" >
                                                    <option value="${menuOneLevelConfig.menuCode}" <c:if test="${menuOneLevelConfig.menuCode eq menuOneLevelCode}">selected</c:if>>${menuOneLevelConfig.menuName}</option>
                                                </c:forEach>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;"><font color="red">*</font>所属二级类别：</td>
                                        <td style="width:80%;" id="subTypeCodeSelect">
                                            <select class="chosen-select form-control" name="subTypeCode" id="subTypeCode" data-placeholder="这里选择所属二级类别" style="width:120px;">
                                                <c:forEach items="${menuTwoLevelConfigList}" var="menuTwoLevelConfig" >
                                                    <option value="${menuTwoLevelConfig.menuCode}" <c:if test="${menuTwoLevelConfig.menuCode eq menuTwoLevelCode}">selected</c:if>>${menuTwoLevelConfig.menuName}</option>
                                                </c:forEach>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;"><font color="red">*</font>圈子名称：</td>
                                        <td style="width:80%;"><input type="text" name="circleName" id="circleName" value="${circleInfo.circleName}" placeholder="这里输入圈子名称" title="圈子名称" style="width:98%;"/></td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;"><font color="red">*</font>是否选为热门：</td>
                                        <td style="width:80%;" id="isHotCircleSelect">
                                            <select class="chosen-select form-control" name="isHotCircle" id="isHotCircle" data-placeholder="这里选择是否选为热门" style="width:120px;">
                                                <c:forEach items="${isHotCircleList}" var="isHotCircleItem" >
                                                    <option value="${isHotCircleItem.value}" <c:if test="${isHotCircleItem.value eq circleInfo.isHotCircle}">selected</c:if>>${isHotCircleItem.description}</option>
                                                </c:forEach>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;"><font color="red">*</font>是否进入精彩页面：</td>
                                        <td style="width:80%;" id="isWonderfulSelect">
                                            <select class="chosen-select form-control" name="isWonderful" id="isWonderful" data-placeholder="这里选择是否进入精彩页面" style="width:120px;">
                                                <c:forEach items="${isWonderfulList}" var="isWonderfulItem" >
                                                    <option value="${isWonderfulItem.value}" <c:if test="${isWonderfulItem.value eq circleInfo.isWonderful}">selected</c:if>>${isWonderfulItem.description}</option>
                                                </c:forEach>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;"><font color="red">*</font>是否禁止发贴：</td>
                                        <td style="width:80%;" id="isProhibitionPublishSelect">
                                            <select class="chosen-select form-control" name="isProhibitionPublish" id="isProhibitionPublish" data-placeholder="这里选择是否禁止发贴" style="width:120px;">
                                                <c:forEach items="${isProhibitionPublishList}" var="isProhibitionPublishItem" >
                                                    <option value="${isProhibitionPublishItem.value}" <c:if test="${isProhibitionPublishItem.value eq circleInfo.isProhibitionPublish}">selected</c:if>>${isProhibitionPublishItem.description}</option>
                                                </c:forEach>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;"><font color="red">*</font>是否禁止评论：</td>
                                        <td style="width:80%;" id="isProhibitionCommentSelect">
                                            <select class="chosen-select form-control" name="isProhibitionComment" id="isProhibitionComment" data-placeholder="这里选择是否禁止评论" style="width:120px;">
                                                <c:forEach items="${isProhibitionCommentList}" var="isProhibitionCommentItem" >
                                                    <option value="${isProhibitionCommentItem.value}" <c:if test="${isProhibitionCommentItem.value eq circleInfo.isProhibitionComment}">selected</c:if>>${isProhibitionCommentItem.description}</option>
                                                </c:forEach>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;">发帖间隔限制：</td>
                                        <td style="width:80%;">
                                            <input type="text" name="hour" id="hour" value="${hour}" placeholder="0-24整数" style="width:20%;"/> 时
                                            <input type="text" name="minute" id="minute" value="${minute}" placeholder="0-60整数" style="width:20%;"/> 分
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label style="color: red;">（如果不填默认0，即不做时间限制）</label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;">发帖篇数限制：</td>
                                        <td style="width:80%;">
                                            <input type="text" name="sendArticleTotal" id="sendArticleTotal" value="${circleInfo.sendArticleTotal}" placeholder="0-999" title="发帖篇数限制" style="width:42%;"/> 每天
                                            &nbsp;&nbsp;&nbsp;&nbsp;<label style="color: red;">（如果不填默认999，即不做篇数限制）</label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: center;" colspan="10">
                                            <a class="btn btn-mini btn-primary" onclick="save();">保存</a>
                                            <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green"></h4></div>
                        </form>
                    </div>
                    <!-- /.col -->
                </div>
                <!-- /.row -->
            </div>
            <!-- /.page-content -->
        </div>
    </div>
    <!-- /.main-content -->
</div>
<!-- /.main-container -->
<!-- basic scripts -->
<!-- 页面底部js¨ -->
<%@ include file="../../system/index/foot.jsp"%>
<!-- ace scripts -->
<script src="static/ace/js/ace/ace.js"></script>
<!-- inline scripts related to this page -->
<!-- 模态框 -->
<script src="static/ace/js/bootbox.js"></script>
<!-- 下拉框 -->
<script src="static/ace/js/chosen.jquery.js"></script>
<!-- 日期框 -->
<script type="text/javascript" src="<%=basePath%>plugins/My97DatePicker_new/WdatePicker.js"></script>
<!--参数校验-->
<script type="text/javascript" src="static/js/public/validate.js"></script>
<!-- 提示框 -->
<script type="text/javascript" src="static/js/jquery.tips.js"></script>
<!-- 富文本编辑器 -->
<script type="text/javascript" src="plugins/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="plugins/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" src="plugins/ueditor/lang/zh-cn/zh-cn.js"></script>
<!-- 本业务js -->
<script type="text/javascript" src="static/js/admin/circle/circleInfo/edit.js"></script>
</body>
<script type="text/javascript">
    $(top.hangge());
    var actionUrl = '${actionUrl}';
    var path = "${pageContext.request.contextPath}";
    var circleNameOld = '${circleInfo.circleName}';
</script>
</html>
